import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import register from '@/components/register'
import layout from '@/components/layout'
import order from '@/components/order'
import addOrder from '@/components/addOrder'
import callList from '@/components/callList'
import person from '@/components/person'
import about from '@/components/about'
import registerw from '@/components/registerw'
import send from '@/components/send'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/register',
      name: 'register',
      component: register
    },
    
    {
      path: '/registerw',
      name: 'registerw',
      component: registerw
    },
    {
      path: '/layout',
      name: 'layout',
      component: layout,
      redirect:'/order',
      children:[
        {
          path: '/order',
          name: 'order',
          component: order
        },
        {
          path: '/addOrder',
          name: 'addOrder',
          component: addOrder
        },
        {
          path: '/callList',
          name: 'callList',
          component: callList
        },
        {
          path: '/person',
          name: 'person',
          component: person
        },
        {
          path: '/about',
          name: 'about',
          component: about
        },
        {
          path: '/send',
          name: 'send',
          component: send
        },
      ]
    }
  ]
})
